<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MRSL Motion Primitive Library: include/mpl_basis/waypoint.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MRSL Motion Primitive Library
   &#160;<span id="projectnumber">1.2</span>
   </div>
   <div id="projectbrief">A motion primitive library for generating trajectory for mobile robots</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_8b04de6a62aca813b0b7abde855cede7.html">mpl_basis</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">waypoint.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="waypoint_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#ifndef MPL_WAYPOINT_H</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#define MPL_WAYPOINT_H</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &lt;bitset&gt;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &lt;boost/functional/hash.hpp&gt;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="control_8h.html">control.h</a>&quot;</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="data__type_8h.html">data_type.h</a>&quot;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="keyword">template</span> &lt;<span class="keywordtype">int</span> Dim&gt;</div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="structWaypoint.html">   23</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structWaypoint.html">Waypoint</a> {</div><div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="structWaypoint.html#aa40502a0517dbb938dc35a52acc89feb">   25</a></span>&#160;  <a class="code" href="structWaypoint.html#aa40502a0517dbb938dc35a52acc89feb">Waypoint</a>() : <a class="code" href="structWaypoint.html#a32d4053f0b72324f20f1d1804fe37755">control</a>(<a class="code" href="namespaceControl.html">Control</a>::NONE) {}</div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="structWaypoint.html#a6d7eaadca98b8aa854e5953c8f983de7">   30</a></span>&#160;  <a class="code" href="structWaypoint.html#a6d7eaadca98b8aa854e5953c8f983de7">Waypoint</a>(<a class="code" href="control_8h.html#af3600af994b25be7c568791eefdadf2e">Control::Control</a> c) : <a class="code" href="structWaypoint.html#a32d4053f0b72324f20f1d1804fe37755">control</a>(c) {}</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="structWaypoint.html#af63de420a521f105eea4ce098a51ad7e">   32</a></span>&#160;  <a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;</a> <a class="code" href="structWaypoint.html#af63de420a521f105eea4ce098a51ad7e">pos</a>{<a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;::Zero</a>()};  </div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="structWaypoint.html#a91393e0d8d73afb9df512710e56f02a5">   33</a></span>&#160;  <a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;</a> <a class="code" href="structWaypoint.html#a91393e0d8d73afb9df512710e56f02a5">vel</a>{<a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;::Zero</a>()};  </div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="structWaypoint.html#a648217ed387d4e226bec8ecb05bfefe8">   34</a></span>&#160;  <a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;</a> <a class="code" href="structWaypoint.html#a648217ed387d4e226bec8ecb05bfefe8">acc</a>{<a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;::Zero</a>()};  </div><div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="structWaypoint.html#a7966bc3955c4c0f880eea35a76e4c8ed">   35</a></span>&#160;  <a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;</a> <a class="code" href="structWaypoint.html#a7966bc3955c4c0f880eea35a76e4c8ed">jrk</a>{<a class="code" href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf&lt;Dim&gt;::Zero</a>()};  </div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="structWaypoint.html#ad5c2f2b8f6dba96bb93faccde844e9a8">   36</a></span>&#160;  <a class="code" href="data__type_8h.html#a7c99d9360fc6cac2762b786e2fb52266">decimal_t</a> <a class="code" href="structWaypoint.html#ad5c2f2b8f6dba96bb93faccde844e9a8">yaw</a>{0};                  </div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="structWaypoint.html#a9661067e17763fffb65d99cabaff802a">   37</a></span>&#160;  <a class="code" href="data__type_8h.html#a7c99d9360fc6cac2762b786e2fb52266">decimal_t</a> <a class="code" href="structWaypoint.html#a9661067e17763fffb65d99cabaff802a">t</a>{0};  </div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;  <span class="keyword">union </span>{</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="keyword">struct </span>{</div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="structWaypoint.html#aad0ad0411c963c0f4c9938a821b84c54">   48</a></span>&#160;      <span class="keywordtype">bool</span> <a class="code" href="structWaypoint.html#aad0ad0411c963c0f4c9938a821b84c54">use_pos</a> : 1;  </div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="structWaypoint.html#af315790148c93d2a438949d649d08b83">   49</a></span>&#160;      <span class="keywordtype">bool</span> <a class="code" href="structWaypoint.html#af315790148c93d2a438949d649d08b83">use_vel</a> : 1;  </div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="structWaypoint.html#a7f7b99a891660a96d67867ece28378e3">   50</a></span>&#160;      <span class="keywordtype">bool</span> <a class="code" href="structWaypoint.html#a7f7b99a891660a96d67867ece28378e3">use_acc</a> : 1;  </div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="structWaypoint.html#a7127a77813618058aaf31e706485fa1c">   51</a></span>&#160;      <span class="keywordtype">bool</span> <a class="code" href="structWaypoint.html#a7127a77813618058aaf31e706485fa1c">use_jrk</a> : 1;  </div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="structWaypoint.html#ac0023df8bacdf49f6198ef6623d678ef">   52</a></span>&#160;      <span class="keywordtype">bool</span> <a class="code" href="structWaypoint.html#ac0023df8bacdf49f6198ef6623d678ef">use_yaw</a> : 1;  </div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    };</div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="structWaypoint.html#a32d4053f0b72324f20f1d1804fe37755">   54</a></span>&#160;    <a class="code" href="control_8h.html#af3600af994b25be7c568791eefdadf2e">Control::Control</a> <a class="code" href="structWaypoint.html#a32d4053f0b72324f20f1d1804fe37755">control</a> : 5;  </div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;  };</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="structWaypoint.html#ac677cec315d07d961fe1448626eee349">   57</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="structWaypoint.html#ac677cec315d07d961fe1448626eee349">enable_t</a>{<span class="keyword">false</span>};  </div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="structWaypoint.html#ae6cb1a0e7b8c7081c3d5ee84c22fe3ad">   61</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="structWaypoint.html#ae6cb1a0e7b8c7081c3d5ee84c22fe3ad">print</a>(std::string str = <span class="stringliteral">&quot;&quot;</span>)<span class="keyword"> const </span>{</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keywordflow">if</span> (!str.empty()) std::cout &lt;&lt; str &lt;&lt; std::endl;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="structWaypoint.html#aad0ad0411c963c0f4c9938a821b84c54">use_pos</a>) std::cout &lt;&lt; <span class="stringliteral">&quot;pos: &quot;</span> &lt;&lt; <a class="code" href="structWaypoint.html#af63de420a521f105eea4ce098a51ad7e">pos</a>.transpose() &lt;&lt; std::endl;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="structWaypoint.html#af315790148c93d2a438949d649d08b83">use_vel</a>) std::cout &lt;&lt; <span class="stringliteral">&quot;vel: &quot;</span> &lt;&lt; <a class="code" href="structWaypoint.html#a91393e0d8d73afb9df512710e56f02a5">vel</a>.transpose() &lt;&lt; std::endl;</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="structWaypoint.html#a7f7b99a891660a96d67867ece28378e3">use_acc</a>) std::cout &lt;&lt; <span class="stringliteral">&quot;acc: &quot;</span> &lt;&lt; <a class="code" href="structWaypoint.html#a648217ed387d4e226bec8ecb05bfefe8">acc</a>.transpose() &lt;&lt; std::endl;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="structWaypoint.html#a7127a77813618058aaf31e706485fa1c">use_jrk</a>) std::cout &lt;&lt; <span class="stringliteral">&quot;jrk: &quot;</span> &lt;&lt; <a class="code" href="structWaypoint.html#a7966bc3955c4c0f880eea35a76e4c8ed">jrk</a>.transpose() &lt;&lt; std::endl;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="structWaypoint.html#ac0023df8bacdf49f6198ef6623d678ef">use_yaw</a>) std::cout &lt;&lt; <span class="stringliteral">&quot;yaw: &quot;</span> &lt;&lt; <a class="code" href="structWaypoint.html#ad5c2f2b8f6dba96bb93faccde844e9a8">yaw</a> &lt;&lt; std::endl;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="structWaypoint.html#ac677cec315d07d961fe1448626eee349">enable_t</a>) std::cout &lt;&lt; <span class="stringliteral">&quot; t: &quot;</span> &lt;&lt; <a class="code" href="structWaypoint.html#a9661067e17763fffb65d99cabaff802a">t</a> &lt;&lt; std::endl;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="structWaypoint.html#a32d4053f0b72324f20f1d1804fe37755">control</a> == Control::VEL)</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;      std::cout &lt;&lt; <span class="stringliteral">&quot;use vel!&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="structWaypoint.html#a32d4053f0b72324f20f1d1804fe37755">control</a> == Control::ACC)</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;      std::cout &lt;&lt; <span class="stringliteral">&quot;use acc!&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="structWaypoint.html#a32d4053f0b72324f20f1d1804fe37755">control</a> == Control::JRK)</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;      std::cout &lt;&lt; <span class="stringliteral">&quot;use jrk!&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="structWaypoint.html#a32d4053f0b72324f20f1d1804fe37755">control</a> == Control::SNP)</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;      std::cout &lt;&lt; <span class="stringliteral">&quot;use snp!&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="structWaypoint.html#a32d4053f0b72324f20f1d1804fe37755">control</a> == Control::VELxYAW)</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;      std::cout &lt;&lt; <span class="stringliteral">&quot;use vel &amp; yaw!&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="structWaypoint.html#a32d4053f0b72324f20f1d1804fe37755">control</a> == Control::ACCxYAW)</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;      std::cout &lt;&lt; <span class="stringliteral">&quot;use acc &amp; yaw!&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="structWaypoint.html#a32d4053f0b72324f20f1d1804fe37755">control</a> == Control::JRKxYAW)</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;      std::cout &lt;&lt; <span class="stringliteral">&quot;use jrk &amp; yaw!&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="structWaypoint.html#a32d4053f0b72324f20f1d1804fe37755">control</a> == Control::SNPxYAW)</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;      std::cout &lt;&lt; <span class="stringliteral">&quot;use snp &amp; yaw!&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;      std::cout &lt;&lt; <span class="stringliteral">&quot;use null!&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;  }</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;};</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<span class="keyword">template</span> &lt;<span class="keywordtype">int</span> Dim&gt;</div><div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="waypoint_8h.html#a0d8460fc701c0a4568800f9adacb24e8">   93</a></span>&#160;std::size_t <a class="code" href="waypoint_8h.html#a0d8460fc701c0a4568800f9adacb24e8">hash_value</a>(<span class="keyword">const</span> <a class="code" href="structWaypoint.html">Waypoint&lt;Dim&gt;</a>&amp; key) {</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;  std::size_t val = 0;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i &lt; Dim; i++) {</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="keywordflow">if</span> (key.<a class="code" href="structWaypoint.html#aad0ad0411c963c0f4c9938a821b84c54">use_pos</a>) {</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;      <span class="keywordtype">int</span> <span class="keywordtype">id</span> = std::round(key.<a class="code" href="structWaypoint.html#af63de420a521f105eea4ce098a51ad7e">pos</a>(i) / 0.01);</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;      boost::hash_combine(val, <span class="keywordtype">id</span>);</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    }</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keywordflow">if</span> (key.<a class="code" href="structWaypoint.html#af315790148c93d2a438949d649d08b83">use_vel</a>) {</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;      <span class="keywordtype">int</span> <span class="keywordtype">id</span> = std::round(key.<a class="code" href="structWaypoint.html#a91393e0d8d73afb9df512710e56f02a5">vel</a>(i) / 0.1);</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;      boost::hash_combine(val, <span class="keywordtype">id</span>);</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    }</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <span class="keywordflow">if</span> (key.<a class="code" href="structWaypoint.html#a7f7b99a891660a96d67867ece28378e3">use_acc</a>) {</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;      <span class="keywordtype">int</span> <span class="keywordtype">id</span> = std::round(key.<a class="code" href="structWaypoint.html#a648217ed387d4e226bec8ecb05bfefe8">acc</a>(i) / 0.1);</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;      boost::hash_combine(val, <span class="keywordtype">id</span>);</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    }</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    <span class="keywordflow">if</span> (key.<a class="code" href="structWaypoint.html#a7127a77813618058aaf31e706485fa1c">use_jrk</a>) {</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;      <span class="keywordtype">int</span> <span class="keywordtype">id</span> = std::round(key.<a class="code" href="structWaypoint.html#a7966bc3955c4c0f880eea35a76e4c8ed">jrk</a>(i) / 0.1);</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;      boost::hash_combine(val, <span class="keywordtype">id</span>);</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    }</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;  }</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;  <span class="keywordflow">if</span> (key.<a class="code" href="structWaypoint.html#ac0023df8bacdf49f6198ef6623d678ef">use_yaw</a>) {</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="keywordtype">int</span> <span class="keywordtype">id</span> = std::round(key.<a class="code" href="structWaypoint.html#ad5c2f2b8f6dba96bb93faccde844e9a8">yaw</a> / 0.1);</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    boost::hash_combine(val, <span class="keywordtype">id</span>);</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;  }</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;  <span class="keywordflow">if</span> (key.<a class="code" href="structWaypoint.html#ac677cec315d07d961fe1448626eee349">enable_t</a>) {</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <span class="keywordtype">int</span> <span class="keywordtype">id</span> = std::round(key.<a class="code" href="structWaypoint.html#a9661067e17763fffb65d99cabaff802a">t</a> / 0.1);</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    boost::hash_combine(val, <span class="keywordtype">id</span>);</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;  }</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;  <span class="keywordflow">return</span> val;</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;}</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="keyword">template</span> &lt;<span class="keywordtype">int</span> Dim&gt;</div><div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="waypoint_8h.html#a44e2365f7c0ac8d5e2a570d688fc318f">  133</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="waypoint_8h.html#a44e2365f7c0ac8d5e2a570d688fc318f">operator==</a>(<span class="keyword">const</span> <a class="code" href="structWaypoint.html">Waypoint&lt;Dim&gt;</a>&amp; l, <span class="keyword">const</span> <a class="code" href="structWaypoint.html">Waypoint&lt;Dim&gt;</a>&amp; r) {</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="waypoint_8h.html#a0d8460fc701c0a4568800f9adacb24e8">hash_value</a>(l) == <a class="code" href="waypoint_8h.html#a0d8460fc701c0a4568800f9adacb24e8">hash_value</a>(r);</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;}</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;<span class="keyword">template</span> &lt;<span class="keywordtype">int</span> Dim&gt;</div><div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="waypoint_8h.html#a3e63b2f41e584d58909454ec7d7b5af2">  139</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="waypoint_8h.html#a3e63b2f41e584d58909454ec7d7b5af2">operator!=</a>(<span class="keyword">const</span> <a class="code" href="structWaypoint.html">Waypoint&lt;Dim&gt;</a>&amp; l, <span class="keyword">const</span> <a class="code" href="structWaypoint.html">Waypoint&lt;Dim&gt;</a>&amp; r) {</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="waypoint_8h.html#a0d8460fc701c0a4568800f9adacb24e8">hash_value</a>(l) != <a class="code" href="waypoint_8h.html#a0d8460fc701c0a4568800f9adacb24e8">hash_value</a>(r);</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;}</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div><div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="waypoint_8h.html#a8932077208778dd6b03383445493929c">  144</a></span>&#160;<span class="keyword">typedef</span> <a class="code" href="structWaypoint.html">Waypoint&lt;2&gt;</a> <a class="code" href="waypoint_8h.html#a8932077208778dd6b03383445493929c">Waypoint2D</a>;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="waypoint_8h.html#a1e186c9e84106b0d20d3972954bda9ac">  147</a></span>&#160;<span class="keyword">typedef</span> <a class="code" href="structWaypoint.html">Waypoint&lt;3&gt;</a> <a class="code" href="waypoint_8h.html#a1e186c9e84106b0d20d3972954bda9ac">Waypoint3D</a>;</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="waypoint_8h_html_a3e63b2f41e584d58909454ec7d7b5af2"><div class="ttname"><a href="waypoint_8h.html#a3e63b2f41e584d58909454ec7d7b5af2">operator!=</a></div><div class="ttdeci">bool operator!=(const Waypoint&lt; Dim &gt; &amp;l, const Waypoint&lt; Dim &gt; &amp;r)</div><div class="ttdoc">Check if two waypoints are not equivalent. </div><div class="ttdef"><b>Definition:</b> waypoint.h:139</div></div>
<div class="ttc" id="structWaypoint_html_a7966bc3955c4c0f880eea35a76e4c8ed"><div class="ttname"><a href="structWaypoint.html#a7966bc3955c4c0f880eea35a76e4c8ed">Waypoint::jrk</a></div><div class="ttdeci">Vecf&lt; Dim &gt; jrk</div><div class="ttdoc">jerk in  </div><div class="ttdef"><b>Definition:</b> waypoint.h:35</div></div>
<div class="ttc" id="structWaypoint_html_ad5c2f2b8f6dba96bb93faccde844e9a8"><div class="ttname"><a href="structWaypoint.html#ad5c2f2b8f6dba96bb93faccde844e9a8">Waypoint::yaw</a></div><div class="ttdeci">decimal_t yaw</div><div class="ttdoc">yaw </div><div class="ttdef"><b>Definition:</b> waypoint.h:36</div></div>
<div class="ttc" id="structWaypoint_html"><div class="ttname"><a href="structWaypoint.html">Waypoint</a></div><div class="ttdoc">Waypoint base class. </div><div class="ttdef"><b>Definition:</b> waypoint.h:23</div></div>
<div class="ttc" id="waypoint_8h_html_a44e2365f7c0ac8d5e2a570d688fc318f"><div class="ttname"><a href="waypoint_8h.html#a44e2365f7c0ac8d5e2a570d688fc318f">operator==</a></div><div class="ttdeci">bool operator==(const Waypoint&lt; Dim &gt; &amp;l, const Waypoint&lt; Dim &gt; &amp;r)</div><div class="ttdoc">Check if two waypoints are equivalent. </div><div class="ttdef"><b>Definition:</b> waypoint.h:133</div></div>
<div class="ttc" id="structWaypoint_html_a7f7b99a891660a96d67867ece28378e3"><div class="ttname"><a href="structWaypoint.html#a7f7b99a891660a96d67867ece28378e3">Waypoint::use_acc</a></div><div class="ttdeci">bool use_acc</div><div class="ttdoc">If true, acc will be used in primitive generation. </div><div class="ttdef"><b>Definition:</b> waypoint.h:50</div></div>
<div class="ttc" id="structWaypoint_html_af315790148c93d2a438949d649d08b83"><div class="ttname"><a href="structWaypoint.html#af315790148c93d2a438949d649d08b83">Waypoint::use_vel</a></div><div class="ttdeci">bool use_vel</div><div class="ttdoc">If true, vel will be used in primitive generation. </div><div class="ttdef"><b>Definition:</b> waypoint.h:49</div></div>
<div class="ttc" id="structWaypoint_html_aa40502a0517dbb938dc35a52acc89feb"><div class="ttname"><a href="structWaypoint.html#aa40502a0517dbb938dc35a52acc89feb">Waypoint::Waypoint</a></div><div class="ttdeci">Waypoint()</div><div class="ttdoc">Empty constructor. </div><div class="ttdef"><b>Definition:</b> waypoint.h:25</div></div>
<div class="ttc" id="control_8h_html_af3600af994b25be7c568791eefdadf2e"><div class="ttname"><a href="control_8h.html#af3600af994b25be7c568791eefdadf2e">Control::Control</a></div><div class="ttdeci">Control</div><div class="ttdoc">Enum for control input. </div><div class="ttdef"><b>Definition:</b> control.h:10</div></div>
<div class="ttc" id="structWaypoint_html_a648217ed387d4e226bec8ecb05bfefe8"><div class="ttname"><a href="structWaypoint.html#a648217ed387d4e226bec8ecb05bfefe8">Waypoint::acc</a></div><div class="ttdeci">Vecf&lt; Dim &gt; acc</div><div class="ttdoc">acceleration in  </div><div class="ttdef"><b>Definition:</b> waypoint.h:34</div></div>
<div class="ttc" id="waypoint_8h_html_a0d8460fc701c0a4568800f9adacb24e8"><div class="ttname"><a href="waypoint_8h.html#a0d8460fc701c0a4568800f9adacb24e8">hash_value</a></div><div class="ttdeci">std::size_t hash_value(const Waypoint&lt; Dim &gt; &amp;key)</div><div class="ttdoc">Generate hash value for Waypoint class. </div><div class="ttdef"><b>Definition:</b> waypoint.h:93</div></div>
<div class="ttc" id="structWaypoint_html_a32d4053f0b72324f20f1d1804fe37755"><div class="ttname"><a href="structWaypoint.html#a32d4053f0b72324f20f1d1804fe37755">Waypoint::control</a></div><div class="ttdeci">Control::Control control</div><div class="ttdoc">Control value. </div><div class="ttdef"><b>Definition:</b> waypoint.h:54</div></div>
<div class="ttc" id="structWaypoint_html_a91393e0d8d73afb9df512710e56f02a5"><div class="ttname"><a href="structWaypoint.html#a91393e0d8d73afb9df512710e56f02a5">Waypoint::vel</a></div><div class="ttdeci">Vecf&lt; Dim &gt; vel</div><div class="ttdoc">velocity in  </div><div class="ttdef"><b>Definition:</b> waypoint.h:33</div></div>
<div class="ttc" id="structWaypoint_html_a9661067e17763fffb65d99cabaff802a"><div class="ttname"><a href="structWaypoint.html#a9661067e17763fffb65d99cabaff802a">Waypoint::t</a></div><div class="ttdeci">decimal_t t</div><div class="ttdoc">time when reaching this waypoint in graph search </div><div class="ttdef"><b>Definition:</b> waypoint.h:37</div></div>
<div class="ttc" id="data__type_8h_html_a7c99d9360fc6cac2762b786e2fb52266"><div class="ttname"><a href="data__type_8h.html#a7c99d9360fc6cac2762b786e2fb52266">decimal_t</a></div><div class="ttdeci">double decimal_t</div><div class="ttdoc">Rename the float type used in lib. </div><div class="ttdef"><b>Definition:</b> data_type.h:49</div></div>
<div class="ttc" id="structWaypoint_html_a7127a77813618058aaf31e706485fa1c"><div class="ttname"><a href="structWaypoint.html#a7127a77813618058aaf31e706485fa1c">Waypoint::use_jrk</a></div><div class="ttdeci">bool use_jrk</div><div class="ttdoc">If true, jrk will be used in primitive generation. </div><div class="ttdef"><b>Definition:</b> waypoint.h:51</div></div>
<div class="ttc" id="data__type_8h_html"><div class="ttname"><a href="data__type_8h.html">data_type.h</a></div><div class="ttdoc">Defines all data types used in this lib. </div></div>
<div class="ttc" id="structWaypoint_html_ac0023df8bacdf49f6198ef6623d678ef"><div class="ttname"><a href="structWaypoint.html#ac0023df8bacdf49f6198ef6623d678ef">Waypoint::use_yaw</a></div><div class="ttdeci">bool use_yaw</div><div class="ttdoc">If true, yaw will be used in primitive generation. </div><div class="ttdef"><b>Definition:</b> waypoint.h:52</div></div>
<div class="ttc" id="data__type_8h_html_a3a0c45655a5e009e56634ccde0c5c575"><div class="ttname"><a href="data__type_8h.html#a3a0c45655a5e009e56634ccde0c5c575">Vecf</a></div><div class="ttdeci">Eigen::Matrix&lt; decimal_t, N, 1 &gt; Vecf</div><div class="ttdoc">Eigen 1D float vector of size N. </div><div class="ttdef"><b>Definition:</b> data_type.h:56</div></div>
<div class="ttc" id="control_8h_html"><div class="ttname"><a href="control_8h.html">control.h</a></div><div class="ttdoc">Control classes. </div></div>
<div class="ttc" id="waypoint_8h_html_a1e186c9e84106b0d20d3972954bda9ac"><div class="ttname"><a href="waypoint_8h.html#a1e186c9e84106b0d20d3972954bda9ac">Waypoint3D</a></div><div class="ttdeci">Waypoint&lt; 3 &gt; Waypoint3D</div><div class="ttdoc">Waypoint for 3D. </div><div class="ttdef"><b>Definition:</b> waypoint.h:147</div></div>
<div class="ttc" id="namespaceControl_html"><div class="ttname"><a href="namespaceControl.html">Control</a></div><div class="ttdef"><b>Definition:</b> control.h:8</div></div>
<div class="ttc" id="structWaypoint_html_a6d7eaadca98b8aa854e5953c8f983de7"><div class="ttname"><a href="structWaypoint.html#a6d7eaadca98b8aa854e5953c8f983de7">Waypoint::Waypoint</a></div><div class="ttdeci">Waypoint(Control::Control c)</div><div class="ttdoc">Simple constructor. </div><div class="ttdef"><b>Definition:</b> waypoint.h:30</div></div>
<div class="ttc" id="structWaypoint_html_af63de420a521f105eea4ce098a51ad7e"><div class="ttname"><a href="structWaypoint.html#af63de420a521f105eea4ce098a51ad7e">Waypoint::pos</a></div><div class="ttdeci">Vecf&lt; Dim &gt; pos</div><div class="ttdoc">position in  </div><div class="ttdef"><b>Definition:</b> waypoint.h:32</div></div>
<div class="ttc" id="structWaypoint_html_aad0ad0411c963c0f4c9938a821b84c54"><div class="ttname"><a href="structWaypoint.html#aad0ad0411c963c0f4c9938a821b84c54">Waypoint::use_pos</a></div><div class="ttdeci">bool use_pos</div><div class="ttdoc">If true, pos will be used in primitive generation. </div><div class="ttdef"><b>Definition:</b> waypoint.h:48</div></div>
<div class="ttc" id="waypoint_8h_html_a8932077208778dd6b03383445493929c"><div class="ttname"><a href="waypoint_8h.html#a8932077208778dd6b03383445493929c">Waypoint2D</a></div><div class="ttdeci">Waypoint&lt; 2 &gt; Waypoint2D</div><div class="ttdoc">Waypoint for 2D. </div><div class="ttdef"><b>Definition:</b> waypoint.h:144</div></div>
<div class="ttc" id="structWaypoint_html_ac677cec315d07d961fe1448626eee349"><div class="ttname"><a href="structWaypoint.html#ac677cec315d07d961fe1448626eee349">Waypoint::enable_t</a></div><div class="ttdeci">bool enable_t</div><div class="ttdef"><b>Definition:</b> waypoint.h:57</div></div>
<div class="ttc" id="structWaypoint_html_ae6cb1a0e7b8c7081c3d5ee84c22fe3ad"><div class="ttname"><a href="structWaypoint.html#ae6cb1a0e7b8c7081c3d5ee84c22fe3ad">Waypoint::print</a></div><div class="ttdeci">void print(std::string str=&quot;&quot;) const</div><div class="ttdoc">Print all attributes. </div><div class="ttdef"><b>Definition:</b> waypoint.h:61</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
